<?php require_once('../Connections/webtintuc.php'); ?><?php require_once('../Connections/webtintuc.php'); ?><?php require_once('../Connections/webtintuc.php'); ?><?php require_once('../Connections/webtintuc.php'); ?><?php
// Load the common classes
require_once('../includes/common/KT_common.php');

// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');

// Load the KT_back class
require_once('../includes/nxt/KT_back.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");

// Make unified connection variable
$conn_webtintuc = new KT_connection($webtintuc, $database_webtintuc);

//start Trigger_CheckPasswords trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckPasswords(&$tNG) {
  $myThrowError = new tNG_ThrowError($tNG);
  $myThrowError->setErrorMsg("Could not create account.");
  $myThrowError->setField("Password");
  $myThrowError->setFieldErrorMsg("The two passwords do not match.");
  return $myThrowError->Execute();
}
//end Trigger_CheckPasswords trigger

//start Trigger_CheckPasswords1 trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckPasswords1(&$tNG) {
  $myThrowError = new tNG_ThrowError($tNG);
  $myThrowError->setErrorMsg("Could not create account.");
  $myThrowError->setField("Password");
  $myThrowError->setFieldErrorMsg("The two passwords do not match.");
  return $myThrowError->Execute();
}
//end Trigger_CheckPasswords1 trigger

//start Trigger_CheckPasswords2 trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckPasswords2(&$tNG) {
  $myThrowError = new tNG_ThrowError($tNG);
  $myThrowError->setErrorMsg("Could not create account.");
  $myThrowError->setField("Password");
  $myThrowError->setFieldErrorMsg("The two passwords do not match.");
  return $myThrowError->Execute();
}
//end Trigger_CheckPasswords2 trigger

//start Trigger_CheckPasswords3 trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckPasswords3(&$tNG) {
  $myThrowError = new tNG_ThrowError($tNG);
  $myThrowError->setErrorMsg("Could not create account.");
  $myThrowError->setField("Password");
  $myThrowError->setFieldErrorMsg("The two passwords do not match.");
  return $myThrowError->Execute();
}
//end Trigger_CheckPasswords3 trigger

// Start trigger
$formValidation3 = new tNG_FormValidation();
$formValidation3->addField("HoTen", true, "text", "", "", "", "");
$formValidation3->addField("Username", true, "text", "", "", "", "");
$formValidation3->addField("Password", true, "text", "", "", "", "");
$formValidation3->addField("Email", true, "text", "email", "", "", "");
$tNGs->prepareValidation($formValidation3);
// End trigger

// Start trigger
$formValidation2 = new tNG_FormValidation();
$formValidation2->addField("Username", true, "text", "", "", "", "");
$formValidation2->addField("Password", true, "text", "", "", "", "");
$formValidation2->addField("Email", true, "text", "email", "", "", "");
$tNGs->prepareValidation($formValidation2);
// End trigger

// Start trigger
$formValidation1 = new tNG_FormValidation();
$formValidation1->addField("Username", true, "text", "", "", "", "");
$formValidation1->addField("Password", true, "text", "", "", "", "");
$formValidation1->addField("Email", true, "text", "email", "", "", "");
$tNGs->prepareValidation($formValidation1);
// End trigger

// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("Username", true, "text", "", "", "", "");
$formValidation->addField("Password", true, "text", "", "", "", "");
$formValidation->addField("Email", true, "text", "email", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger

//start Trigger_CheckOldPassword trigger
//remove this line if you want to edit the code by hand
function Trigger_CheckOldPassword(&$tNG) {
  return Trigger_UpdatePassword_CheckOldPassword($tNG);
}
//end Trigger_CheckOldPassword trigger

// Make an insert transaction instance
$ins_users = new tNG_multipleInsert($conn_webtintuc);
$tNGs->addTransaction($ins_users);
// Register triggers
$ins_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
$ins_users->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$ins_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$ins_users->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords", 50);
// Add columns
$ins_users->setTable("users");
$ins_users->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$ins_users->addColumn("Username", "STRING_TYPE", "POST", "Username");
$ins_users->addColumn("Password", "STRING_TYPE", "POST", "Password");
$ins_users->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$ins_users->addColumn("Email", "STRING_TYPE", "POST", "Email");
$ins_users->setPrimaryKey("idUser", "NUMERIC_TYPE");

// Make an update transaction instance
$upd_users = new tNG_multipleUpdate($conn_webtintuc);
$tNGs->addTransaction($upd_users);
// Register triggers
$upd_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");
$upd_users->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$upd_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$upd_users->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords", 50);
$upd_users->registerTrigger("BEFORE", "Trigger_CheckOldPassword", 60);
// Add columns
$upd_users->setTable("users");
$upd_users->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$upd_users->addColumn("Username", "STRING_TYPE", "POST", "Username");
$upd_users->addColumn("Password", "STRING_TYPE", "POST", "Password");
$upd_users->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$upd_users->addColumn("Email", "STRING_TYPE", "POST", "Email");
$upd_users->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an instance of the transaction object
$del_users = new tNG_multipleDelete($conn_webtintuc);
$tNGs->addTransaction($del_users);
// Register triggers
$del_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1");
$del_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$del_users->setTable("users");
$del_users->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an insert transaction instance
$ins_users1 = new tNG_multipleInsert($conn_webtintuc);
$tNGs->addTransaction($ins_users1);
// Register triggers
$ins_users1->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert2");
$ins_users1->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation1);
$ins_users1->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$ins_users1->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords1", 50);
// Add columns
$ins_users1->setTable("users");
$ins_users1->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$ins_users1->addColumn("Active", "NUMERIC_TYPE", "VALUE", "1");
$ins_users1->addColumn("Username", "STRING_TYPE", "POST", "Username");
$ins_users1->addColumn("Password", "STRING_TYPE", "POST", "Password");
$ins_users1->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$ins_users1->addColumn("Email", "STRING_TYPE", "POST", "Email");
$ins_users1->setPrimaryKey("idUser", "NUMERIC_TYPE");

// Make an update transaction instance
$upd_users1 = new tNG_multipleUpdate($conn_webtintuc);
$tNGs->addTransaction($upd_users1);
// Register triggers
$upd_users1->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update2");
$upd_users1->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation1);
$upd_users1->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$upd_users1->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords1", 50);
$upd_users1->registerTrigger("BEFORE", "Trigger_CheckOldPassword", 60);
// Add columns
$upd_users1->setTable("users");
$upd_users1->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$upd_users1->addColumn("Active", "NUMERIC_TYPE", "CURRVAL", "");
$upd_users1->addColumn("Username", "STRING_TYPE", "POST", "Username");
$upd_users1->addColumn("Password", "STRING_TYPE", "POST", "Password");
$upd_users1->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$upd_users1->addColumn("Email", "STRING_TYPE", "POST", "Email");
$upd_users1->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an instance of the transaction object
$del_users1 = new tNG_multipleDelete($conn_webtintuc);
$tNGs->addTransaction($del_users1);
// Register triggers
$del_users1->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete2");
$del_users1->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$del_users1->setTable("users");
$del_users1->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an insert transaction instance
$ins_users2 = new tNG_multipleInsert($conn_webtintuc);
$tNGs->addTransaction($ins_users2);
// Register triggers
$ins_users2->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert3");
$ins_users2->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation2);
$ins_users2->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$ins_users2->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords2", 50);
// Add columns
$ins_users2->setTable("users");
$ins_users2->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$ins_users2->addColumn("Username", "STRING_TYPE", "POST", "Username");
$ins_users2->addColumn("Password", "STRING_TYPE", "POST", "Password");
$ins_users2->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$ins_users2->addColumn("Email", "STRING_TYPE", "POST", "Email");
$ins_users2->addColumn("Active", "NUMERIC_TYPE", "VALUE", "1");
$ins_users2->addColumn("Expiration", "NUMERIC_TYPE", "POST", "Expiration", "0");
$ins_users2->setPrimaryKey("idUser", "NUMERIC_TYPE");

// Make an update transaction instance
$upd_users2 = new tNG_multipleUpdate($conn_webtintuc);
$tNGs->addTransaction($upd_users2);
// Register triggers
$upd_users2->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update3");
$upd_users2->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation2);
$upd_users2->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$upd_users2->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords2", 50);
$upd_users2->registerTrigger("BEFORE", "Trigger_CheckOldPassword", 60);
// Add columns
$upd_users2->setTable("users");
$upd_users2->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$upd_users2->addColumn("Username", "STRING_TYPE", "POST", "Username");
$upd_users2->addColumn("Password", "STRING_TYPE", "POST", "Password");
$upd_users2->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$upd_users2->addColumn("Email", "STRING_TYPE", "POST", "Email");
$upd_users2->addColumn("Active", "NUMERIC_TYPE", "CURRVAL", "");
$upd_users2->addColumn("Expiration", "NUMERIC_TYPE", "POST", "Expiration");
$upd_users2->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an instance of the transaction object
$del_users2 = new tNG_multipleDelete($conn_webtintuc);
$tNGs->addTransaction($del_users2);
// Register triggers
$del_users2->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete3");
$del_users2->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$del_users2->setTable("users");
$del_users2->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an insert transaction instance
$ins_users3 = new tNG_multipleInsert($conn_webtintuc);
$tNGs->addTransaction($ins_users3);
// Register triggers
$ins_users3->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert4");
$ins_users3->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation3);
$ins_users3->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$ins_users3->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords3", 50);
// Add columns
$ins_users3->setTable("users");
$ins_users3->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$ins_users3->addColumn("Username", "STRING_TYPE", "POST", "Username");
$ins_users3->addColumn("Password", "STRING_TYPE", "POST", "Password");
$ins_users3->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$ins_users3->addColumn("Email", "STRING_TYPE", "POST", "Email");
$ins_users3->addColumn("Active", "NUMERIC_TYPE", "VALUE", "1");
$ins_users3->addColumn("idGroup", "NUMERIC_TYPE", "POST", "idGroup");
$ins_users3->setPrimaryKey("idUser", "NUMERIC_TYPE");

// Make an update transaction instance
$upd_users3 = new tNG_multipleUpdate($conn_webtintuc);
$tNGs->addTransaction($upd_users3);
// Register triggers
$upd_users3->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update4");
$upd_users3->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation3);
$upd_users3->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
$upd_users3->registerConditionalTrigger("{POST.Password} != {POST.re_Password}", "BEFORE", "Trigger_CheckPasswords3", 50);
$upd_users3->registerTrigger("BEFORE", "Trigger_CheckOldPassword", 60);
// Add columns
$upd_users3->setTable("users");
$upd_users3->addColumn("HoTen", "STRING_TYPE", "POST", "HoTen");
$upd_users3->addColumn("Username", "STRING_TYPE", "POST", "Username");
$upd_users3->addColumn("Password", "STRING_TYPE", "POST", "Password");
$upd_users3->addColumn("DiaChi", "STRING_TYPE", "POST", "DiaChi");
$upd_users3->addColumn("Email", "STRING_TYPE", "POST", "Email");
$upd_users3->addColumn("Active", "NUMERIC_TYPE", "CURRVAL", "");
$upd_users3->addColumn("idGroup", "NUMERIC_TYPE", "POST", "idGroup");
$upd_users3->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Make an instance of the transaction object
$del_users3 = new tNG_multipleDelete($conn_webtintuc);
$tNGs->addTransaction($del_users3);
// Register triggers
$del_users3->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete4");
$del_users3->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$del_users3->setTable("users");
$del_users3->setPrimaryKey("idUser", "NUMERIC_TYPE", "GET", "idUser");

// Execute all the registered transactions
$tNGs->executeTransactions();

// Get the transaction recordset
$rsusers = $tNGs->getRecordset("users");
$row_rsusers = mysql_fetch_assoc($rsusers);
$totalRows_rsusers = mysql_num_rows($rsusers);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title><link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../includes/common/js/base.js" type="text/javascript"></script><script src="../includes/common/js/utility.js" type="text/javascript"></script><script src="../includes/skins/style.js" type="text/javascript"></script><?php echo $tNGs->displayValidationRules();?><script src="../includes/nxt/scripts/form.js" type="text/javascript"></script><script src="../includes/nxt/scripts/form.js.php" type="text/javascript"></script><script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: true,
  show_as_grid: true,
  merge_down_value: true
}
</script><link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../includes/common/js/base.js" type="text/javascript"></script><script src="../includes/common/js/utility.js" type="text/javascript"></script><script src="../includes/skins/style.js" type="text/javascript"></script><?php echo $tNGs->displayValidationRules();?><script src="../includes/nxt/scripts/form.js" type="text/javascript"></script><script src="../includes/nxt/scripts/form.js.php" type="text/javascript"></script><script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: true,
  show_as_grid: true,
  merge_down_value: true
}
</script><link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../includes/common/js/base.js" type="text/javascript"></script><script src="../includes/common/js/utility.js" type="text/javascript"></script><script src="../includes/skins/style.js" type="text/javascript"></script><?php echo $tNGs->displayValidationRules();?><script src="../includes/nxt/scripts/form.js" type="text/javascript"></script><script src="../includes/nxt/scripts/form.js.php" type="text/javascript"></script><script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: true,
  show_as_grid: true,
  merge_down_value: true
}
</script><link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../includes/common/js/base.js" type="text/javascript"></script><script src="../includes/common/js/utility.js" type="text/javascript"></script><script src="../includes/skins/style.js" type="text/javascript"></script><?php echo $tNGs->displayValidationRules();?><script src="../includes/nxt/scripts/form.js" type="text/javascript"></script><script src="../includes/nxt/scripts/form.js.php" type="text/javascript"></script><script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: true,
  show_as_grid: true,
  merge_down_value: true
}
</script>
</head>

<body>
<?php
	echo $tNGs->getErrorMsg();
?>
<div class="KT_tng">
  <h1>
    <?php 
// Show IF Conditional region1 
if (@$_GET['idUser'] == "") {
?>
    <?php echo NXT_getResource("Insert_FH"); ?>
    <?php 
// else Conditional region1
} else { ?>
    <?php echo NXT_getResource("Update_FH"); ?>
    <?php } 
// endif Conditional region1
?>
    Users </h1>
  <div class="KT_tngform">
    <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
      <?php $cnt1 = 0; ?>
      <?php do { ?>
      <?php $cnt1++; ?>
      <?php 
// Show IF Conditional region1 
if (@$totalRows_rsusers > 1) {
?>
      <h2><?php echo NXT_getResource("Record_FH"); ?> <?php echo $cnt1; ?></h2>
      <?php } 
// endif Conditional region1
?>
      <table cellpadding="2" cellspacing="0" class="KT_tngtable">
        <tr>
          <td class="KT_th"><label for="HoTen_<?php echo $cnt1; ?>">HoTen:</label></td>
          <td><input type="text" name="HoTen_<?php echo $cnt1; ?>" id="HoTen_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rsusers['HoTen']); ?>" size="32" maxlength="100" />
              <?php echo $tNGs->displayFieldHint("HoTen");?> <?php echo $tNGs->displayFieldError("users", "HoTen", $cnt1); ?> </td>
        </tr>
        <tr>
          <td class="KT_th"><label for="Username_<?php echo $cnt1; ?>">Username:</label></td>
          <td><input type="text" name="Username_<?php echo $cnt1; ?>" id="Username_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rsusers['Username']); ?>" size="32" maxlength="50" />
              <?php echo $tNGs->displayFieldHint("Username");?> <?php echo $tNGs->displayFieldError("users", "Username", $cnt1); ?> </td>
        </tr>
        <?php 
// Show IF Conditional show_old_Password_on_update_only 
if (@$_GET['idUser'] != "") {
?>
        <tr>
          <td class="KT_th"><label for="old_Password_<?php echo $cnt1; ?>">Old Password:</label></td>
          <td><input type="password" name="old_Password_<?php echo $cnt1; ?>" id="old_Password_<?php echo $cnt1; ?>" value="" size="32" maxlength="50" />
              <?php echo $tNGs->displayFieldError("users", "old_Password", $cnt1); ?> </td>
        </tr>
        <?php } 
// endif Conditional show_old_Password_on_update_only
?>
        <tr>
          <td class="KT_th"><label for="Password_<?php echo $cnt1; ?>">Password:</label></td>
          <td><input type="password" name="Password_<?php echo $cnt1; ?>" id="Password_<?php echo $cnt1; ?>" value="" size="32" maxlength="50" />
              <?php echo $tNGs->displayFieldHint("Password");?> <?php echo $tNGs->displayFieldError("users", "Password", $cnt1); ?> </td>
        </tr>
        <tr>
          <td class="KT_th"><label for="re_Password_<?php echo $cnt1; ?>">Re-type Password:</label></td>
          <td><input type="password" name="re_Password_<?php echo $cnt1; ?>" id="re_Password_<?php echo $cnt1; ?>" value="" size="32" maxlength="50" />
          </td>
        </tr>
        <tr>
          <td class="KT_th"><label for="DiaChi_<?php echo $cnt1; ?>">DiaChi:</label></td>
          <td><input type="text" name="DiaChi_<?php echo $cnt1; ?>" id="DiaChi_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rsusers['DiaChi']); ?>" size="32" maxlength="255" />
              <?php echo $tNGs->displayFieldHint("DiaChi");?> <?php echo $tNGs->displayFieldError("users", "DiaChi", $cnt1); ?> </td>
        </tr>
        <tr>
          <td class="KT_th"><label for="Email_<?php echo $cnt1; ?>">Email:</label></td>
          <td><input type="text" name="Email_<?php echo $cnt1; ?>" id="Email_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rsusers['Email']); ?>" size="32" maxlength="255" />
              <?php echo $tNGs->displayFieldHint("Email");?> <?php echo $tNGs->displayFieldError("users", "Email", $cnt1); ?> </td>
        </tr>
        <tr>
          <td class="KT_th">Active:</td>
          <td><?php echo KT_escapeAttribute($row_rsusers['Active']); ?></td>
        </tr>
        <tr>
          <td class="KT_th"><label for="idGroup_<?php echo $cnt1; ?>_1">idGroup:</label></td>
          <td><div>
            <input <?php if (!(strcmp(KT_escapeAttribute($row_rsusers['idGroup']),"1"))) {echo "CHECKED";} ?> type="radio" name="idGroup_<?php echo $cnt1; ?>" id="idGroup_<?php echo $cnt1; ?>_1" value="1" />
            <label for="idGroup_<?php echo $cnt1; ?>_1">Quyền quản trị</label>
          </div>
              <div>
                <input <?php if (!(strcmp(KT_escapeAttribute($row_rsusers['idGroup']),"0"))) {echo "CHECKED";} ?> type="radio" name="idGroup_<?php echo $cnt1; ?>" id="idGroup_<?php echo $cnt1; ?>_2" value="0" />
                <label for="idGroup_<?php echo $cnt1; ?>_2">Không quyền quản trị</label>
              </div>
            <?php echo $tNGs->displayFieldError("users", "idGroup", $cnt1); ?> </td>
        </tr>
      </table>
      <input type="hidden" name="kt_pk_users_<?php echo $cnt1; ?>" class="id_field" value="<?php echo KT_escapeAttribute($row_rsusers['kt_pk_users']); ?>" />
      <?php } while ($row_rsusers = mysql_fetch_assoc($rsusers)); ?>
      <div class="KT_bottombuttons">
        <div>
          <?php 
      // Show IF Conditional region1
      if (@$_GET['idUser'] == "") {
      ?>
          <input type="submit" name="KT_Insert4" id="KT_Insert4" value="<?php echo NXT_getResource("Insert_FB"); ?>" />
          <?php 
      // else Conditional region1
      } else { ?>
          <div class="KT_operations">
            <input type="submit" name="KT_Insert4" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'idUser')" />
          </div>
          <input type="submit" name="KT_Update4" value="<?php echo NXT_getResource("Update_FB"); ?>" />
          <input type="submit" name="KT_Delete4" value="<?php echo NXT_getResource("Delete_FB"); ?>" onclick="return confirm('<?php echo NXT_getResource("Are you sure?"); ?>');" />
          <?php }
      // endif Conditional region1
      ?>
          <input type="button" name="KT_Cancel1" value="<?php echo NXT_getResource("Cancel_FB"); ?>" onclick="return UNI_navigateCancel(event, '../includes/nxt/back.php')" />
        </div>
      </div>
    </form>
  </div>
  <br class="clearfixplain" />
</div>
<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

</body>
</html>
